
// Multiple inheritance not supported ny class but supported by interfaces .
package egs.intrerface;
/*

interface printable{
	void print();
}
interface showable{
	void show();
}

public class A implements printable,showable{
	
public void print(){ System.out.println("Print");}
public void show(){System.out.println("show");}

	public static void main(String[] args) {
	A o=new A();
	o.print();
	o.show();
	
	}

}
*/

// no Ambiguity  as in case with Multiple inheritance with classes.. as implementation for the interface is provided by a single class.

/*
interface printable{
	void print();
}
interface showable{
	void print();
}
public class A implements printable,showable{
	
public void print(){ System.out.println("Print");}
//public void show(){System.out.println("show");}

	public static void main(String[] args) {
	A o=new A();
	o.print();
	
	
	}

}
*/

// one interface EXTENDS another interface 


interface printable{
	void print();
}
interface showable extends printable{
	void show();
}

public class A implements showable{
	
public void print(){ System.out.println("Print");}
public void show(){System.out.println("show");}

	public static void main(String[] args) {
	A o=new A();
	o.print();
	o.show();
	
	}

}
